package com.lightboat.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum RedisSnEnum {
    DEFAULT("000",0L, "默认",""),
    ACCOUNT("001",1000000L, "账号","lb"),
    ORDER("002",0L, "订单","YS"),
    REPURCHASE_ORDER("004",0L, "复购订单","FG"),
    WITHDRAWAL("003",0L, "提现","WVN"),
    AFTER_SALE_ORDER("005",0L, "售后单","AS")
    ;

    private final String key;
    private final Long initial;
    private final String desc;
    private final String code;

    public static RedisSnEnum findKey(String key) {
        for (RedisSnEnum value : RedisSnEnum.values()) {
            if (value.getKey().equals(key)) {
                return value;
            }
        }
        return null;
    }
}
